var returnCashRecord = {
    id: "returnCashRecordTable",
    seItem: null,
    table: null,
    layerIndex: -1
};
returnCashRecord.initColumn = function () {
    var columns = [
        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
        {title: '客户姓名', field: 'customerName', align: 'center', valign: 'middle', sortable: true, width: 120},
        {title: '电话', field: 'customerPhone', align: 'center', valign: 'middle', sortable: true, width: 140},
        {title: '操作方式', field: 'mode', align: 'center', valign: 'middle', sortable: true, width: 120},
        {title: '返现金额', field: 'scoreBalance', align: 'center', valign: 'middle', sortable: true, width: 120},
        {title: '备注', field: 'remarks', align: 'center', valign: 'middle', sortable: true, width: 120},
        {title: '操作人', field: 'addPeople', align: 'center', valign: 'middle', sortable: true, width: 120},
        {title: '返现时间', field: 'addTime', align: 'center', valign: 'middle', sortable: true, width: 130,
            formatter: function (value, row, index) {
                return value.substring(0, 19);
            }
        },
        {title: '充值门诊', field: 'addStore', align: 'center', valign: 'middle', sortable: true, width: 120},
    ]
    return columns;
};
/**
 * 查询预约客户列表
 */
returnCashRecord.search = function () {
    returnCashRecord.table.refresh();
};
$(function () {
    var defaultColunms = returnCashRecord.initColumn();
    var reservationsId = parent.$("#reservationsId").val();
    var table = new BSTable(returnCashRecord.id, "/customer/getreturnCashRecordList/" + reservationsId, defaultColunms);
    table.setPaginationType("client");//客户端分页
    returnCashRecord.table = table.init();
    returnCashRecord.search();
    $(document).ready( function (){ $( '#returnCashRecordTable' ).bootstrapTable('resetView',{ height: $(window).height()-76 } );});
});